package net.butfly.bus.filter;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.butfly.bus.Constants.FilterSide;
import net.butfly.bus.Request;
import net.butfly.bus.Response;

public abstract class FilterBase implements Filter {
	protected Logger logger = LoggerFactory.getLogger(this.getClass());
	FilterChain chain;
	protected FilterSide side;

	@Override
	public void initialize(Map<String, String> params) {}

	@Override
	public void execute(Request request, Response response) throws Exception {
		chain.execute(this, request, response);
	}

	@Override
	public final void setSide(FilterSide side) {
		this.side = side;
	}
}